Public Class frmMain
    Public _player As New OCDSCore()
    Dim _fullscreen As New frmFullscreen()
    Dim _videowindow As New ucWindow()
    Dim _sparkle As AppLimit.NetSparkle.Sparkle

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        _sparkle = New AppLimit.NetSparkle.Sparkle("http://update.xs.meamod.com/meamodplayme/update/nextgen/versioninfo.xml")
        _sparkle.ApplicationIcon = My.Resources.playme_logo_48
        _sparkle.ApplicationWindowIcon = My.Resources.MeaMod_Playme
        _sparkle.ApplicationIconLarge = My.Resources.playme128
        _sparkle.CorpBranding("MeaMod Update", My.Resources.pbmp)
        _sparkle.StartLoop(True)
    End Sub

    Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        ucControlsMain.Init(_player, OpenFileDialog, _videowindow, pnWindow, _fullscreen, Me)
        _videowindow.Size = pnWindow.Size()
        Me.pnWindow.Controls.Add(_videowindow)
        _player.Init(_videowindow.Handle, ucControlsMain)
    End Sub

    Private Sub frmMain_SizeChanged(sender As System.Object, e As System.EventArgs) Handles MyBase.SizeChanged
        _videowindow.Size = pnWindow.Size
    End Sub

    Private Sub mbExit_Click(sender As System.Object, e As System.EventArgs) Handles mbExit.Click
        Application.Exit()
    End Sub

    Private Sub mbAbout_Click(sender As System.Object, e As System.EventArgs) Handles mbAbout.Click
        frmAbout.ShowDialog()
    End Sub

    Private Sub frmMain_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        UcEAC1.Exit()
    End Sub

    Private Sub CheckFroUpdatesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CheckFroUpdatesToolStripMenuItem.Click
        _sparkle.StartLoop(True)
    End Sub
End Class

